import axiosRequest from "@/api/axiosRequest.ts";

const BaseUrl = '/friendLink'

const getLinkPage = (page: number, size: number, status?: number) => axiosRequest({
    url: BaseUrl + '/page',
    method: 'GET',
    params: {
        current: page,
        size: size,
        status:status
    }
})


const apply = (link: FriendLinkParam) => axiosRequest({
    url: BaseUrl + '/apply',
    method: 'POST',
    data: link
})

export const linkApi = {
    getLinkPage,
    getTopLink: () => axiosRequest.get(BaseUrl + '/getTopLink'),
    apply
}
